import React from 'react';
import classnames from 'classnames';
import Style from './index.module.less';

import '@amap/amap-jsapi-types';

const FuzzyAddressInput = (props: { type: string }) => {
  const iconTextMapping = {
    start: { text: '装', bgColor: '#0047AB' },
    end: { text: '卸', bgColor: '#E37318' },
    route: { text: '经', bgColor: '#A6A6A6' },
  };
  return (
    <div className={classnames(Style.Icon)} style={{ backgroundColor: iconTextMapping[props.type]?.bgColor }}>
      {iconTextMapping[props.type]?.text}
    </div>
  );
};

FuzzyAddressInput.displayName = 'FuzzyAddressInput';

export default FuzzyAddressInput;
